#include<iostream>
#include<vector>
using namespace std;
void test_vector1()
{
	vector<int> v1;
	vector<int> v2(10,1);
	vector<int> v3(v2.begin(), v2.end());
	vector<int> v4(v2.begin() + 2, v2.end() - 4);
	
	/*for (int i = 0; i < v2.size(); ++i)
	{
		cout << v3[i]++ << " ";
	}
	cout << endl;*/

	/*vector<int>::iterator it = v4.begin();
	while (it != v4.end())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;
	for (auto e : v4)
	{
		cout << e << " ";
	}
	cout << endl;*/

	/*cout << v2.size() << endl;
	cout << v4.size() << endl;
	cout << v2.capacity() << endl;
	cout << v4.capacity() << endl;
	cout << v2.empty() << endl;*/
	//v2.resize(10, 5);
	/*v2.reserve(20);
	v2.resize(5);
	cout << v2.size() << endl;
	cout << v2.capacity() << endl;
	for (auto e : v2)
	{
		cout << e << " ";
	}
	cout << endl; */
	//cout << v2.at(0) << endl;
	/*v2.push_back(66);
	for (auto e : v2)
	{
		cout << e << " ";
	}*/
	//cout << endl;
	/*v2.pop_back();
	for (auto e : v2)
	{
		cout << e << " ";
	}*/
	/*cout << v2.front() << endl;
	cout << v2.back() << endl;*/

	/*v2.assign(5, 6);
	for (auto e : v2)
	{
		cout << e << " ";
	}*/

	//v2.insert(v2.begin()+2, 5);
	//v2.insert(v2.end() - 2, 7);
	/*for (auto e : v2)
	{
		cout << e << " ";
	}*/
	auto pos1 = find(v2.begin(), v2.end(), 6);
	v2.insert(pos1, 66);
	for (auto e : v2)
	{
		cout << e << " ";
	}
	auto pos2 = find(v2.begin(), v2.end(), 66);
	v2.erase(pos2);
	for (auto e : v2)
	{
		cout << e << " ";
	}


	
}

#include"vector.h"

namespace jy
{
	void test_vector1()
	{
		vector<int> v1;
		v1.push_back(1);
		v1.push_back(1);
		v1.push_back(1);
		v1.push_back(1);
		vector<int> v2(10u, 1);
		v2.push_back(66);
	/*	for (int i = 0; i < v2.size(); i++)
		{
			cout << v2[i] << " ";
		}
		cout << endl;*/
		/*cout << v2.size() << endl;
		cout << v2.capacity() << endl;
		v2.resize(5);
		cout << v2.size() << endl;
		cout << v2.capacity() << endl;
		v2.resize(20);
		cout << v2.size() << endl;
		cout << v2.capacity() << endl;*/
		//v1 = v2;
		/*auto pos1 = find(v2.begin(), v2.end(), 66);
		v2.insert(pos1, 3);
		printf(v2);
		cout << endl;

		auto pos2 = find(v2.begin(), v2.end(), 3);
		v2.erase(pos2);
		printf(v2);*/
		v2 = v1;
		printf(v1);
	}

	
}

int main()
{
	//test_vector1();
	jy::test_vector1();
	return 0;
}
